package com.moensun.cloud.client.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.client.RestTemplate;

/**
 * Created by Bane.Shi.
 * Copyright MoenSun
 * User: Bane.Shi
 * Date: 2017/3/6
 * Time: 21:29
 */
@RestController
@RequestMapping(value = "/user")
public class UserController {

	@Autowired
	private RestTemplate restTemplate;

	@RequestMapping(value = "",method = RequestMethod.GET)
	public String uname() {
		return  restTemplate.getForObject("http://cloud-service/user",String.class);
	}

}
